import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const userInfoStore = defineStore('userinfo', () => {
    const username = ref("momo");
    const nickedname = ref("momo");
    const headpicture = ref(""); //在服务器上的图片id

    function setUserName(temp) {
        username.value = temp;
    }
    function setNickName(temp) {
        nickedname.value = temp;
    }
    function setHeadPicture(temp) {
        headpicture.value = temp;
    }

  return { username, nickedname, headpicture, setUserName, setNickName, setHeadPicture }
})